<div class="bigtitle"><?=lang('menu_yourprofile')?> &gt; <?=lang('yourprofile_changepassword')?></div>
<table class='tblcontent' cellspacing='0' cellpadding='0' border='0'>
	<tr>
		<td>
			<?=form_open(site_url('yourprofile/savepassword'),array('name'=>'frm','onsubmit'=>'return f_save()'),array('hidden_status'=>''))?>	
			<table class='tblinputform' cellspacing='1' cellpadding='2' border='0' width='50%'>							
				<tr>
					<th width='30%'><?=lang('yourprofile_currentpwd')?></th>
					<td width='70%'><input type='password' name='txt_currentpwd' style='width:300px;' maxlength='50' value=''/></td>
				</tr>
				<tr>
					<th><?=lang('yourprofile_newpwd')?></th>
					<td><input type='password' name='txt_newpwd' style='width:300px;' maxlength='50' value=''/></td>
				</tr>
				<tr>
					<th><?=lang('yourprofile_confirmpwd')?></th>
					<td><input type='password' name='txt_confirmpwd' style='width:300px;' maxlength='50' value=''/></td>
				</tr>							
			</table>
			<div class='ctrlbtn'>
				<input type='button' name='btn_save' value='<?=lang('label_save')?>' onclick='return f_save()'/>	
				<input type='button' name='btn_cancel' value='<?=lang('label_cancel')?>' onclick='window.location="<?=site_url('yourprofile')?>";'/>
			</div>
			<div class='alertmsg'><?=$errmsg?></div>
			<?=form_close()?>				
		</td>
	</tr>
</table>
<script type='text/javascript'>
function f_save(){
	form = document.frm;
	if(form.txt_currentpwd.value==''){
		alert('<?=lang('yourprofile_js_inputcurrpwd')?>');
		form.txt_currentpwd.focus();
		return false;
	}
	if(form.txt_newpwd.value==''){
		alert('<?=lang('yourprofile_js_inputnewpwd')?>');
		form.txt_newpwd.focus();
		return false;
	}
	if(form.txt_confirmpwd.value==''){
		alert('<?=lang('yourprofile_js_inputconfirmpwd')?>');
		form.txt_confirmpwd.focus();
		return false;
	}
	if(form.txt_confirmpwd.value!=form.txt_newpwd.value){
		alert('<?=lang('yourprofile_js_pwdnotmatch')?>');
		form.txt_confirmpwd.value='';
		form.txt_newpwd.value='';
		form.txt_newpwd.focus();
		return false;
	}
	form.submit();
}
document.frm.txt_currentpwd.focus();
</script>